<%@page import="qualomelhor.database.ParametrosSistema.OrigemLogin"%>
<%@page import="qualomelhor.database.Usuario"%>
<%@page import="qualomelhor.util.Util"%>


<%
	Usuario u = (Usuario)session.getAttribute("USUARIOATUAL"); 
	String locale = (String)session.getAttribute("LOCALE");	
%>

<html>
	<head>
	</head>
	<body style="height: 50px; margin: 0px 5px;">
	
	<% if (u == null) { %>
	
		<span id="login"></span>
	    <script type="text/javascript">

	      twttr.anywhere(function (T) {

	        T("#login").connectButton({ size: "large" });

	      });

	    </script>


			<div style="position:relative; top:50%; height:22px; margin-top:-11px; margin-left: 5px; float: left;">
				<div class="fb-login-button" id="divLoginFB" style="display: block;" perms="email"><%=Util.getConstant("Facebook Login", locale)%></div>
			</div>
	<% } else { %>
		<% if (u.getOrigemLogin() == OrigemLogin.FACEBOOK.getSiteOrigem()) { %>
				<div style="position:relative; top:50%; height:50px; margin-top: -25px; float: left;">
					<img src="http://graph.facebook.com/<%=u.getUserId()%>/picture" style=" float: left;">
				</div>
				<div style="position:relative; top:50%; height:16px; margin-top:-8px; float: left;">
					<div style="color:white; font-size: 16px; font-family: tahoma;">
						<%=u.getNomeUsuario()%>
					</div>
				</div>
		<% } else { %>
			<P><B><%=u.getNomeUsuario()%></B></P>
		<% } %>
	<% } %>

	</body>
</html>